/**
  ******************************************************************************
  * @file  appli.h
  * @author  MCU Group Shanghai
  * @version  V3.0.0
  * @date  07/10/2009
  * @brief  Irda Send and Receive
  ******************************************************************************
  * @copy
  *
  * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
  * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
  * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
  * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
  * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
  * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
  *
  * <h2><center>&copy; COPYRIGHT 2009 STMicroelectronics</center></h2>
  */ 

/* Define to prevent recursive inclusion -------------------------------------*/
/* Includes ------------------------------------------------------------------*/

typedef enum {
  CAPTURE_START = 0,
  CAPTURE_RISING,
  CAPTURE_FALLING,
}CAPTURE_STATUS;

typedef enum {
  OUTPUT_CARRIER = 0,
  OUTPUT_LOW,
  OUTPUT_END,
}OUTPUT_STATUS;

typedef enum {
  GLOBAL_IDLE = 0,
  GLOBAL_CAPTURE, 
  GLOBAL_CAPTURE_END,
  GLOBAL_REPEAT, 
  GLOBAL_BACKUP,
}GLOBAL_STATUS;


void Irda_In_Capture_Configuration(void);
void carrier_38K_configuration(void);
void GPIO_Configuration(void);
void NVIC_Configuration(void);
void user_interface_configuration(void);
void Irda_Out_Compare_Configuration(void);
void Timer_Configuration(void);
void Display_Wave(void);

extern CAPTURE_STATUS capture_state;
extern volatile u32 num_capture_codes;
extern uint16_t *pRmtCtrlCodeBuf;
extern OUTPUT_STATUS output_state;
extern GLOBAL_STATUS global_state; 
extern GLOBAL_STATUS global_state_backup; 